

import 'package:flutter/cupertino.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

///导航页切换provider
final pageProvider = ChangeNotifierProvider((ref) => PageProvider());
class PageProvider extends ChangeNotifier{
  int currentPage = 0;
  int aimPage = 0;
  //设置目标页面
  setAim(int index){
    aimPage = index;
  }
  changeTab(int index){
    currentPage = index;
    notifyListeners();
  }
}